﻿using Dapper;
using System;
using BCEntity.OA.WorkflowActive.WorkflowActivityStepFormItem;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;

namespace BCData.OA.WorkflowActive.WorkflowActivityStepFormItem
{
	/// <summary>
	/// 工作流活动步骤表单项
	/// </summary>
	public interface IWorkflowActivityStepFormItemData
	{
		#region  成员方法
		/// <summary>
		/// 是否存在该记录
		/// </summary>
		/// <param name="workflowActivityStepFormItemId">工作流活动步骤表单项Id</param>
		Task<bool> Exists(long workflowActivityStepFormItemId);
		/// <summary>
		/// 增加工作流活动步骤表单项
		/// </summary>
		/// <param name="entity">工作流活动步骤表单项信息</param>
		Task<WorkflowActivityStepFormItemEntity> Add(WorkflowActivityStepFormItemEntity entity);
		/// <summary>
		/// 更新工作流活动步骤表单项
		/// </summary>
		/// <param name="entity">工作流活动步骤表单项信息</param>
		Task<WorkflowActivityStepFormItemEntity> Update(WorkflowActivityStepFormItemEntity entity);
		/// <summary>
		/// 删除工作流活动步骤表单项
		/// </summary>
		/// <param name="workflowActivityStepFormItemId">工作流活动步骤表单项Id</param>
		Task<bool> Delete(long workflowActivityStepFormItemId);
		/// <summary>
		/// 获取工作流活动步骤表单项
		/// </summary>
		/// <param name="workflowActivityStepFormItemId">工作流活动步骤表单项Id</param>
		Task<WorkflowActivityStepFormItemEntity> GetEntity(long workflowActivityStepFormItemId);
		/// <summary>
		/// 获取工作流活动步骤表单项列表
		/// </summary>
		/// <param name="workflowActivityId">工作流活动Id</param>
		Task<IEnumerable<WorkflowActivityStepFormItemEntity>> GetList(long workflowActivityId);
		/// <summary>
		/// 获取工作流活动步骤表单项分页列表
		/// </summary>
		/// <param name="start">开始时间</param>
		/// <param name="end">结束时间</param>
		/// <param name="sortName">排序字段</param>
		/// <param name="ascending">升序</param>
		/// <param name="pageIndex">当前页码</param>
		/// <param name="pageSize">每页数据条数</param>
		Task<(IEnumerable<WorkflowActivityStepFormItemEntity>, int)> Query(DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
		#endregion  成员方法
	}


}